home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-11-23 | 47.5 KB | 1,061 lines | [TEXT/EDIT] |
- Tips for administrating and supporting ORACLE7 for A/UX Desktop
- Victor Grigorieff
- September 29, 1993 Apple A/UX 3.0.1
-
- Revised: 10/28 by Victor Grigorieff
-
- This bulletin explains many of the tools and procedures used in setting up,
- administrating, and supporting ORACLE7 on A/UX 3.0.1. It is helpful to gather
- the pieces of information mentioned in this bulletin before trying other
- methods of diagnosing problems.
-
- This bulletin describes several UNIX commands, but does not provide complete
- definitions of them. Please refer to the documentation from Apple
- Computer Inc, or the manual pages on-line for complete definitions of the
- commands described below.
-
- Manual pages is an option which can be chosen at the time you install the
- A/UX operating system. If they are installed, you can access the information
- with the command called man.
-
- Type 'man man' for a description of the man command.
-
- Note: for clarity, some commands are inclosed in single quotes (') with the
- arguments they accept.
-
- The commands and configuration files of imporetance are listed below, and
- are grouped by the type of task to which they are related.
-
- Macintosh Environment & A/UX Management
- ---------------------------------------
-
- If you are logged into the console of A/UX 3.0.1 in the Macintosh Finder
- environment, you there are several things which you need to know.
-
- Command-Control-E If the Macintosh ever appears to freeze (You cannot type or
- move the mouse), DO NOT RESTART THE MACHINE. You can kill
- the Macintosh session by holding down Command-Control-E.
- The Command key is the key which looks like an Apple or a
- clover. Doing this will return you to the A/UX login
- screen, but will not affect any other UNIX processes on the
- machine, like the Oracle database.
-
- General Controls Under the Apple menu, there is an option for Control Panels.
- In the Control Panels folder is a General Controls Control
- Panel, which will let you set the date and time on the A/UX
- machine.
-
- TextEditor If you need to edit a text file, and prefer the Macintosh
- interface, you can look in /: Applications for the program
- called TextEditor. It works like any other word processor
- on the Macintosh.
-
- /etc/RELEASE_ID - This text file tells you the version of A/UX you are
- running. A/UX 3.0.1 is required for ORACLE7 Server
- for A/UX.
-
- Type the command 'cat /etc/RELEASE_ID' to list the file:
-
- cat /etc/hosts
- **********************************
- * A/UX 3.0.1 *
- * Friday, April 9, 1993 *
- **********************************
-
- User Management
- ---------------
-
- id displays user and group IDs and names
- If you are logged in as the oracle user, you will get output like
- this:
-
- % id
- uid=1000(oracle) gid=1000(dba)
-
- This means that you are the oracle user, and your active group is
- dba. By default, the oracle user and dba group own the oracle
- database installation, meaning that this user can perform
- privileged operations. You must have dba privileges to connect
- internal, and to startup or shutdown a database.
-
- passwd passwd is the command to change the password for a user account.
- If I am logged in as oracle, and type 'passwd oracle', I will be
- asked for the current password (if there is one), and will then be
- allowed to enter a new password.
-
- By default the oracle and root users have no password, so it is
- important to set passwords for those users.
-
- su su is the command to become another user.
-
- su - oracle
-
- This command prompts you for a password, and then logs you in as
- the oracle user, while reading in the oracle user's environment.
- If you leave out the '-' between the su command and the user, you
- will not read in that user's environment propoerly. If you are
- logged in as some other user, and wish to login as the oracle
- user, use the above command.
-
- You usually become the oracle user when you want to start/stop the
- database, and perform routine maintenance.
-
- Network Management
- ------------------
-
- hostname - displays the name of the UNIX host. This is helpful in figuring
- out how to assemble a sql*net connect string for TCP/IP.
-
- % hostname
- squid
-
- In this case, my hostname is 'squid'.
-
- ping ping is a command which sends simple TCP/IP packets to a host to
- determine whether or not the host is functioning on the network.
- If you are having trouble connecting to a host with telnet or
- SQL*Net TCP/IP (ORA-6108 errors), then you should check to see if
- ping can reach the host.
-
- ** Ping is used to check how the host is responding to TCP/IP
- ** packects, which are completely different than Appletalk
- ** packets. If a client Macintosh can access the server using
- ** File Sharing, then that means that the network is physically
- ** intact. It DOES NOT tell you that TCP/IP is functioning
- ** properly. You should use ping to verify the TCP/IP setup.
-
- ping can be run by typing '/usr/etc/ping some_host' where
- some_host is the name (or IP address) of a machine on the network.
- See the description of the /etc/hosts file below for more info.
-
- /usr/etc/ping squid
- PING squid.us.oracle.com: 56 data bytes
- 64 bytes from 139.185.81.95: icmp_seq=0. time=0. ms
- 64 bytes from 139.185.81.95: icmp_seq=1. time=0. ms
- ----squid.us.oracle.com PING Statistics----
- 2 packets transmitted, 2 packets received, 0% packet loss
- round-trip (ms) min/avg/max = 0/0/0
-
- Since squid has been properly configured for TCP/IP and is
- running, TCP/IP packets travel to it and back with no problem.
- The ping command will keep sending packets until you hit
- control-C, at which point it gives you the PING Statistics.
-
- If I attempt to ping a machine which is down, the ping command
- will keep sending packets until the host responds (which may never
- happen) or until you hit Control-C. If you do not see any lines
- like '64 bytes from...' after 10 seconds, hit control-C, and you
- will have output which looks like:
-
- /usr/etc/ping bartman
- PING bartman.us.oracle.com: 56 data bytes
-
- ----bartman.us.oracle.com PING Statistics----
- 12 packets transmitted, 0 packets received, 100% packet loss
-
- In this case, bartman (a UNIX machine) has been turned off, and
- hence does not respond to the ping command. The 100% packet loss
- means that the host you are attempting to ping is not working, or
- is actually at a different address than the one you are trying.
-
- If I am trying to make a database connection to bartman using a
- database connect string like 'T:bartman:SAMP', I would get the
- ORA-6108 error, indicating that the TCP/IP connection attempt
- failed. I could then use the ping command to find out if the
- machine named bartman is functioning on the network. If bartman
- does not respond to a ping, action should be taken to revive
- bartman. In this case, I would go and turn the machine on.
-
- If bartman does resond to a ping, but not a SQL*Net TCP/IP
- connection attempt, then there could be several different things
- going on.
-
- * The SQL*Net TCP/IP version 1 listener process (orasrv) may not
- be running. Check to see if orasrv is active on the machine,
- and if the /etc/services file has the correct entry for orasrv.
-
- * Turn off the server and attempt to ping the server. This may
- sound like a silly thing to do, but if you ping a machine that
- is turned off and it actually responds, you know that there is
- another machine using the same IP address. If this happens,
- you need to talk to your network administrator to determine a
- new unique address for your server.
-
- telnet telnet is a way to log into another machine on the network using
- TCP/IP. It is a useful debugging tool as well as a convenience.
-
- telnet squid
- Trying...
- Connected to squid.us.oracle.com.
- Escape character is '^]'.
-
- Apple Computer A/UX (squid)
-
- login:
-
- Once you see the login prompt, type the UNIX userid you wish to
- use and hit return. You will then be asked for a password. Once
- you have successfully entered the password, you will be working
- with the remote machine you have logged into, until you type exit.
-
- ftp ftp is a command you can use to transfer files from one machine to
- another. If you are transferring anything other than a text file,
- remember to type the command 'binary' at the 'ftp> prompt.
-
- /etc/hosts This file lists all the IP addresses and host names for
- all machines that the A/UX server can connect to using
- TCP/IP.
-
- 127.0.0.1 loop local me localhost
- 139.185.81.95 squid.us.oracle.com squid
-
- In this file is the default 127.0.0.1 which is an internal
- loopback entry, and the definition for this host, which is
- squid. 127.0.0.1 is a special address. Any machine that
- attempts to connect to that address will connect to itself.
-
- The hosts file is used when the machine needs to figure out
- the IP address of a host, when it knows the hostname.
-
- If you try to telnet to a host which is not in the hosts
- file, you will see:
-
- telnet does_not_exist
- does_not_exist: unknown host
-
- /etc/services This file should contain an entry for the SQL*Net TCP/IP
- version 1 server. If you do not have the proper line in
- ths file, you will get the ORA-6107 error while attempting
- to use SQL*Net TCP/IP version 1. The line should look like:
-
- orasrv 1525/tcp oracle
-
- /etc/NETADDRS This file lists the TCP/IP network configuration for the
- UNIX machine.
-
- ao0 139.185.81.95 139.185.81.255 255.255.255.0
-
- ao0 refers to the built-in ethernet device of the server.
- 139.185.81.95 is the IP address of the server.
- 139.185.81.255 is the broadcast address of the server.
- 255.255.255.0 is the subnet mask for the server.
-
- This file is created when you run the newconfig utility.
- Checking this file can be helpful to debug TCP/IP
- connectivity problems and address conflicts.
-
- UNIX Command Management
- -----------------------
-
- man man is a program which displays the help and documentation
- available for a command.
-
- man <some_command>
-
- will show you the description of the command, one page at a time.
- As you are browsing the description, you hit the space bar to
- advance a page, and the return key to advance one line.
-
- apropos gives a listing of all commands which have a certain text string
- in their description. This is useful if you remember what a
- command does, but not its name.
-
- For example, you know you need to reconfigure your UNIX kernel to
- set up certain network services. If you forget which command
- to use, type:
-
- apropos kernel
-
- It will give a listing of commands and descriptions, which have
- the word 'kernel' in them. from that list, you determine that
- the command you were looking for was:
-
- newconfig(1M) - generates an up-to-date kernel
-
- After finding a command with apropos, check the man page on the
- command before executing it. It is a good idea to be aware of all
- of the options available before running a command.
-
- more more can be called on a file, to display the file a
- screen at a time. It can also have the output of a command piped
- through it to show output a screen at a time.
-
- ps -ef | more
-
- This will give you a long listing of processes, a page at a time.
-
- | (pipe) The '|' is the UNIX pipe operator. It sends the output of
- the first command through the second command.
-
- some_command | some_other_command
-
- some_command will not send its output to the screen, but instead,
- the output will be read and processed by some_other_command.
-
- grep - grep is a text-searching utility that returns all lines that
- contain the search condition.
-
- grep <some_condition> <some_file>
-
- This searches <some_file> for <some_condition>, and returns all
- lines that match the search criterion.
-
- % grep squid /etc/hosts
- 139.185.81.95 squid.us.oracle.com squid
-
- This command lists all lines in the /etc/hosts file with 'squid'
- in them. When combined with the 'hostname' command above, this is
- a great way to find out what the A/UX machine's IP address is.
- In this example, 139.185.81.95 is my IP address, which identifies
- my machine on the TCP/IP network.
-
- wc wc counts characters, words, and lines in a file. It can be very
- helpful to pipe the output of another program through wc.
-
- ps -ef | wc
- 134 1339 8817
-
- 'ps -ef' gives a long listing of all processes on the machine, and
- wc tells you that there are 134 lines in that output. This means
- that there are 134 processes currently running.
-
- head head <some_file> displays the first 10 lines of a file. This is
- useful if you just want to peek at the beginning of a file.
-
- 'ps -ef | head' lists the first 10 processes.
-
- tail tail is like head, except it returns the last 10 lines.
-
- which which will tell you exactly what function or executable will be
- executed, given a particular command.
-
- 'which cc' (This will tell me '/bin/cc' if the C compiler is
- installed, or tell me 'cc: Command not found' if the
- C compiler is not installed.)
-
- Process & System Management
- ------------------
-
- ps -ef gives a long listing of all processes running on the UNIX machine.
- There are usually MANY processes running on a UNIX machine, so you
- usually want to pipe the output through 'more' or 'grep'.
-
- ps -ef | more
-
- This will show you all of the processes a screen at a time. Hit
- the space bar to see the next page.
-
- ps -ef | grep oracle
-
- This will give you a full listing of all processes owned by
- oracle, or with oracle in their name.
-
- % ps -ef | grep oracle
- UID PID PPID C STIME TTY TIME COMMAND
- oracle 1520 1474 5 17:27:48 qa 0:00 ps -ef
- oracle 1521 1474 2 17:27:48 qa 0:00 grep oracle
- oracle 20307 1 0 Aug 20 p2 0:00 ora_pmon_SAMP
- oracle 20308 1 0 Aug 20 p2 0:01 ora_dbwr_SAMP
- oracle 20309 1 0 Aug 20 p2 0:05 ora_lgwr_SAMP
- oracle 20310 1 0 Aug 20 p2 0:45 ora_smon_SAMP
- oracle 20311 1 0 Aug 20 p2 0:00 ora_reco_SAMP
- daemon 1473 21954 4 17:08:27 ? 0:26 oracleSAMP T:I,1024,5
- oracle 1531 1530 0 17:34:55 qa 0:00 oracleSAMP AT:I,0,5
- oracle 1474 1456 0 17:08:34 qa 0:01 -csh
-
- Note: I pasted the titles of the columns into this document for
- clarity. The UID is the owner of the process. The COMMAND
- is the name of the process.
-
- In this example, you see that there are 5 processes with the
- format ora_XXXX_SAMP. These are the processes that make up the
- ORACLE database named SAMP. The 'oracleSAMP T:I,1024,5' process
- is called a TCP/IP shadow process, and means that there is a
- remote user connected to the SAMP database using SQL*Net TCP/IP.
- The 'oracleSAMP AT:I,0,5' process is an Appletalk shadow process,
- representing a remote connection using SQL*Net Appletalk.
-
- From time to time, you may have to kill these shadow processes.
- 'ps -ef | grep oracle' will help you find them.
-
- kill kill can be used to terminate a process that is no longer needed
- on your machine.
-
- kill <PID>
-
- where PID is the process ID of the process you wish to terminate.
- The PID can be determined by looking at the second column of the
- ps -ef listing explained above.
-
- For example, as part of the 'ps -ef' listing, I see:
-
- daemon 1473 21954 4 17:08:27 ? 0:26 oracleSAMP T:I,1024,5
-
- If I know that no one is connected to the SAMP database using
- TCP/IP, I can kill the orphaned shadow process with the command:
-
- kill 1473
-
- Then the process will be dead, and the database will clean up
- after the connection. If the process does not die, you can use
- 'kill -9 <PID>' instead, which will definitely kill the process.
-
- & The ampersand character, when added onto any other command, will
- run the program in the background, which means that you could run
- another command in the current window.
-
- atksrv Squid
-
- would normally just run the program, and you could not type any
- other commands (except control-c to stop the program).
-
- atksrv Squid &
-
- runs the same command in the background, meaning that you can run
- other programs.
-
- jobs lists the jobs which are currently in the background.
-
- jobs
- [1] + Running atksrv MyServer
-
- % This command is used to bring a bring a background process to the
- foreground. In the above example, there was a background process
- called 'atksrv MyServer'. Typing % at the prompt would bring the
- 'atksrv MyServer' process back to the foreground.
-
- If there are multiple processes in the background, you can use
- '%2' to bring the second process in the list to the foreground.
-
- pstat -m pstat -m lists current system status, including the amount of
- physical memory which is currently free.
-
- uptime uptime tells you how long the UNIX machine has been running, and
- what the current load average is on the machine. It also tells
- you the current time, which lets you know if you need to reset the
- clock on your server.
-
- uptime
- 7:28am up 54 days, 13:59, 19 users, load average: 2.29 2.32 2.20
-
- The load average tells you how many processes are actively using
- the processor. At the time I ran this command, there were 130
- processes on the machine, but only two of them were active. If I
- have 5 remote macintosh clients actively start using one of the
- databases, the 5 shadow processes would become active, and the
- load would jump from about 2 to about 7.
-
- ipcs -a ipcs -m lists the status of all attatched blocks of shared memory.
- An Oracle database uses a block of shared memory to store the SGA
- (Shared Global Area).
-
- ipcs -m
- IPC status from /dev/kmem as of Wed Sep 15 07:35:18 1993
- T ID KEY MODE OWNER GROUP
- Shared Memory:
- m 2100 0x744c4f57 --rw------- root root
- m 1501 0x00028d92 --rw-r----- oracle dba
- m 402 0x00020386 --rw-r----- oracle dba
- m 203 0x00025a8e --rw-r----- oracle dba
- m 404 0x0002c003 --rw-r----- oracle dba
- m 605 0x0002f58f --rw-r----- oracle dba
-
- The first entry is owned by root, with the root group. This
- segment is used by the UNIX kernel, and is OK.
-
- Note: the order of the entries in this list does not matter.
-
- The other 5 segments here are blocks which were obtained by Oracle
- databases on the machine. I know this because the owner is oracle
- and the group is dba. I can then determine which Oracle databases
- are running by looking for processes with the letters 'dbwr' in
- the name, as that is a process which is required by the rdbms.
-
- ps -ef | grep dbwr
- root 10355 10242 2 07:39:46 pb 0:00 grep dbwr
- oracle 4196 1 0 Sep 2 ? 0:02 ora_dbwr_S6A
- oracle 5856 1 0 Sep 8 ? 0:02 ora_dbwr_S6C
- oracle 4211 1 0 Sep 2 ? 0:02 ora_dbwr_S6B
- oracle 4232 1 0 Sep 2 q4 0:02 ora_dbwr_SAMP
-
- Looking at the right column, I see 4 processes with the name
- ora_dbwr_???, where ??? is the name of the database (SID). The
- databases S6A,S6B,S6C, and SAMP are active on this machine.
-
- I have 4 running datbases, and 5 segments of shared memory
- attatched by Oracle databases. This generally means that a
- database was terminated abnormally (by killing the processes or a
- severe crash). That last block of shared memory will not be freed
- until the system is rebooted.
-
- In situations where you have blocks of shared memory that were not
- freed, you should reboot the system as soon as you can.
-
- File Management
- ---------------
-
- ls ls gives a listing of the files in the current directory.
-
- ls -lF gives a useful long listing, and places a '/' after the
- name of each directory, and a '*' after each executable program.
-
- ls -a lists all files, including files that begin with the "."
-
- cd cd changes the current directory.
-
- 'cd /' changes the active directory to the root of the filesystem.
-
- 'cd ..' changes to the parent directory of the current directory.
-
- pwd pwd tells you what directory you are accessing.
-
- mkdir 'mkdir new_directory' makes a new directory called 'new_directory'
-
- cp cp is the command to copy a file to a new file.
-
- 'cp -r' is a recursive copy, which can copy directories and their
- contents.
-
- mv mv is the command to move or rename a file. mv is not capable of
- moving a file from one filesystem to another.
-
- chmod chmod <new permissions> <some_file> changes the permission bits on
- a file. chmod is often used to either restrict access to a file,
- or to enable the 'setuid bit' on an executable program.
-
- A file has certain permission bits, which determine the rights to
- read, write, and execute the file. These permissions are given
- differently to the owner of the file, the group to which the file
- belongs, and everyone else.
-
- ls -l will give a full listing of files, and the left-most column
- is a listing of permission bits.
-
- -rwxr-xr-x 1 oracle dba 4122655 Jun 19 14:19 sqldba*
-
- There are a total of 10 characters in the left column.
-
- The first character is '-' for a file, and 'd' if the item is a
- directory.
-
- The next 9 characters are 3 groups of 3 characters each.
- Each group determines the rights to read, write, and execute.
-
- rwx means that read, write, and execute rights are enabled
- r-x means that read and execute are enabled, but writing is not.
-
- If the letter is present in a particular position, the right is
- enbabled. If there is a '-', the permission is disabled.
-
- The first group of letters corresponds to the rights granted to
- the owner of the file. The userid listed in the third column of
- the ls -l output is the owner of the file.
-
- ** If the owner's permissions are 'rws', then the setuid bit is
- ** set, meaning that the program will run with all of the rights
- ** as the owner of the program, regardless of who invokes the
- ** program.
-
- The second group of letters corresponds to the rights of the group
- to which the file corresponds, which is the fourth parameter of
- the ls -l output.
-
- The third group of letters defines the permissions for everybody.
-
- -rwxr-xr-x means that everyone can read and execute the file, but
- only the owner can write (modify) it.
-
- -rwsr-x--- means that the setuid bit is enabled, people in the
- group which owns the file may read and execute the file,
- but people outside of the group have no access to the
- program.
-
- To set the permissions, you need to assemble a string of 3 numbers
- to tell chmod how to set the permissions. Different priviledges
- are enabled by adding up the numbers below:
-
- read - 4
- write - 2
- execute - 1
-
- read and execute priviledges (4 + 1) are 5
- read, write, and execute (4 + 2 + 1) are 7
- to set the setuid bit, you prefix your string with the number 4.
-
- chmod 755 (yields -rwxr-xr-x)
- chmod 400 (yields -r--------)
- chmod 4755 (yields -rwsr-xr-x) (The setuid bit is enabled)
-
- The files 'orasrv' and 'oracle' (which are located in the
- /users/oracle/bin) should be -rwsr-xr-x. You can set these
- permissions with the command:
-
- chmod 4755 orasrv oracle
-
- chown chown <new_owner> <some_file> changes the ownership of <some_file>
- to be owned by <new_owner>. Only the current owner or the
- superuser (root) may issue this command.
-
- Only the owner and the superuser (root) may delete a file.
- the ownership of a file is usually most important with executable
- files that have the setuid bit set (see chmod above).
-
- *** Note: when you change the ownership of a file, the permission
- *** bits can be changed. You may need to use the chmod
- *** command to get the proper setting.
-
- chgrp chgrp <new_group> <some_file> changes the group ownership of
- <some_file> to be owned by <new_group>. Only the current owner or
- the superuser (root) may issue this command.
-
- find find can be used to locate files, and perform an action on each of
- them if desired.
-
- find . -exec ls -l {}\;
-
- This command looks a bit confusing, but it gives a long listing of
- the files in the current directory, as well as all of the
- subdirectories. Check the manual pages on find for more detailed
- information.
-
- tar tar creates archives and extracts data from them.
-
- tar -cf archive.tar something
- (creates a new archive called 'archive.tar' containing a copy
- of 'something'. Something could be a file, or a filesystem)
-
- ** Note: NEVER try to back up a database that is RUNNING.
- ** copies of running databases WILL NOT WORK.
-
- tar -xf archive.tar
- (extracts the contents of archive.tar into the current directory)
-
- compress 'compress some_file' will create a compressed version of the file
- called some_file.Z, and deletes some_file. You must uncompress
- the some_file.Z before using it again.
-
- Filesystem Management
- ---------------------
-
- If you are not familiar with filesystems, mounting of filesystems, or disk
- setup in general on A/UX 3.0.1, please refer to the "Disk Setup" section of
- Bulletin #103947.028 -- "Setting up an AWS 95 Server for ORACLE7 for A/UX".
-
- df -B df will give you a line of information for each of the mounted
- filesystems. Note the captital letter 'B', which specifies that
- the results should be given in kilobytes.
-
- df -B
- Filesystem kbytes used avail %used Mounted on
- /dev/dsk/c0d0s0 140519 125637 7856 94% /
- /dev/dsk/c300d0s 637015 523524 81640 87% /u1
- /dev/dsk/c401d0s 1122889 805559 261185 76% /u2
-
- This command tells you which filesystems were successfully
- mounted, where they are mounted, how big they are, and how much
- space is available on each of them.
-
- ** Notice that the 'Filesystem' column is not giving you the first
- ** 16 letters in the name of the disk device file. If you need
- ** the full name, check the /etc/fstab file, or use the df command
- ** without the -B flag.
-
- /etc/fstab the fstab file has one line for each filesystem which should be
- mounted. It specifies the type of filesystem, where to mount it,
- and on what device it resides.
-
- # fstab for Squid 6/23/93
- #
- /dev/dsk/c300d0s0 / ignore rw 1 0
- /dev/dsk/c300d0s2 /u1 4.2 rw 1 0
- /dev/dsk/c401d0s2 /u2 4.2 rw 1 0
-
- The lines that begin with # are ignored. It is a good idea to put
- notes in this file that identify which machine it belongs to, and
- when it was last modified. Whenever you modify this file, you
- should PRINT it and put it somewhere safe.
-
- *** IMPORTANT: having a printout of the fstab file is very helpful
- *** if your machine has a damaged root partition, and
- *** you need to remember where all of your filesystems
- *** reside. You need to know the location of your root
- *** filesystem. /dev/dsk/c300d0s0 is the default, but
- *** it may be different on your system.
-
- *** I like to tape a printout of this file to the machine.
-
- fsck fsck checks filesystem consistency and interactively repairs the
- filesystem. If a filesystem will not mount, you need to run fsck
- on it to verify and fix it. fsck works on a disk device file that
- corresponds to the filesystem in question. If the filesystem
- which normally mounts fine on u1 is not mounting, I need to run
- fsck. I can't just run 'fsck u1'. I need to run fsck on the disk
- device file that was listed in the /etc/fstab file that
- corresponds to the problematic filesystem.
-
- squid.root # fsck /dev/dsk/c300d0s2
- ** /dev/dsk/c300d0s2
- ** Last Mounted on /u1
- ** Phase 1 - Check Blocks and Sizes
- ** Phase 2 - Check Pathnames
- ** Phase 3 - Check Connectivity
- ** Phase 4 - Check Reference Counts
- ** Phase 5 - Check Cyl groups
- FILE SYSTEM STATE IS MARKED AS DIRTY
- FIX?
-
- When you find out "FILE SYSTEM STATE IS MARKED AS DIRTY", you do
- NOT ALWAYS want to fix that.
-
- ** If the filesystem is currently mounted ( it shows up when
- you use the df command), it will be DIRTY, which is OK.
- Filesystems are dirty when there is data in buffers that has
- not been written out to disk, which is fine if the
- filesystem is mounted and in use. If this is the case,
- choose N.
-
- ** If the filesystem is not mounted (it does not show up when
- you use the df command) then you should choose Y.
-
- If an Oracle database (or some other program) is writing to a
- file on a filesystem at the time a server goes down (crashes),
- then the filesystem will not mount when the server comes back up.
- You need to run fsck to repair the dirty filesystem.
-
- If the dirty filesystem is the root (/) filesystem, then A/UX will
- not boot. The A/UX Startup program will tell you that the
- root filesystem (/dev/dsk/c0d0s0) is dirty, and will present you
- with a window in which you can issue some UNIX commands. Try:
-
- fsck /dev/dsk/c300d0s0
-
- Once fsck completes the repairs on the filesystem, you should be
- able to type the command 'boot' to start A/UX.
-
- mount -a mount -a will attempt to mount every filesystem listed in the
- /etc/fstab file. If mount -a returns no information, that means
- that it had no problem. If it gives you errors, that means that
- either the /etc/fstab file is not set up properly, or the
- filesystem is damaged and should be checked with fsck.
-
- mount -a is automatically called at startup time. You should only
- need to use this command after modifying the /etc/fstab file or
- after repairing a filesystem with fsck.
-
- Unix Shells:
- -----------
-
- .login The .login file is in the home directory of each user. The .login
- file contains commands which are executed automatically when the
- user logs in to the UNIX machine.
-
- It is often helpful to set the following in the .login file:
-
- setenv ORACLE_HOME /users/oracle
- setenv ORACLE_SID SAMP
- setenv PATH "/users/oracle/bin:/bin:/usr/bin:/usr/ucb:
- /mac/bin:/etc:/usr/etc:/usr/local/bin"
-
- Adding these lines to the .login file will set these variables
- automatically when you next login, or use the source command.
-
- PATH PATH is the environment variable which lists the directories on the
- UNIX machine that will be searched when a command is typed.
- If I type 'do_something', and there is no program called
- 'do_something' in the current directory, the shell will search all
- the directories listed in the PATH for an executable program
- called 'do_something'. A default PATH may look like:
-
- PATH=:/bin:/usr/bin:/usr/ucb:/mac/bin:/etc:/usr/etc:/usr/local/bin
-
- If you try to use the oracle program called 'sqldba' you will see:
-
- sqldba
- sqldba: Command not found.
-
- If you want to be able to use Oracle commands, you should add the
- bin directory of the oracle home to the PATH. This is
- '/users/oracle/bin' by default. Then the PATH would look like:
-
- PATH=:/bin:/usr/bin:/usr/ucb:/mac/bin:/etc:/usr/etc:/usr/local/bin:
- /users/oracle/bin
-
- In this case, the PATH references /users/oracle/bin, so the sqldba
- command can be used without problem.
-
- csh csh is the C shell, which is the default shell for each user
- except root. Use the setenv command to set environment variables.
- when running the C shell. This is also known as /bin/csh.
-
- setenv setenv sets environment variables under csh.
-
- 'setenv SOME_VARIABLE some_contents' sets the variable
- SOME_VARIABLE to be some_contents.
-
- There are 3 environment variables which are important under A/UX.
- They are ORACLE_HOME, ORACLE_SID, and PATH.
-
- ORACLE_HOME = /users/oracle ( This is the directory where the
- oracle files and executables reside )
- ORACLE_SID = SAMP ( This is the name of the default
- database, which is SAMP )
- PATH = ../users/oracle/bin.. ( discussed in PATH section above )
-
- sh sh is the Bourne shell, which is the default user for the root
- user. This is also known as /bin/sh.
-
- To set an environment variable in the Bourne shell, you can do:
-
- SOME_VARIABLE=some_contents; export SOME_VARIABLE
-
- It is important to add the '; export SOME_VARIABLE' to the line,
- as otherwise programs that you run will not be able to evaluate
- that environment variable.
-
- ORACLE_SID=SAMP; export SAMP
-
- This sets the ORACLE_SID to be SAMP, and allows other programs you
- run (like Oracle utilities) to read the variable.
-
- env env lists the names and contents of all variables in the current
- shell's environment.
-
- source source is used to read in a configuration file. If you edit the
- .login file, and want the changes to take effect, you can log out
- and log in again, or read in the file. To read in the .login:
-
- source .login
-
- This will run all of the commands in the .login file.
-
- Oracle Database Management
- --------------------------
-
- tcpctl tcpctl is a command to help you start, stop, and get the status of
- the SQL*Net TCP/IP version 1 listener.
-
- ** 'tcpctl status' should give you the status of orasrv.
-
- tcpctl status
- tcputl: Status summary follows
- Server is running:
- Started : 8-SEP-93 12:08:51
- Last connection : 15-SEP-93 11:09:17
- Total connections : 87
- Total rejections : 3
- Active subprocesses : 9
- ORACLE SIDs : S6A,S6B,S6C,S7F,SAMP
- Default SID : (null)
- Logging mode is ENABLED.
- DBA logins are DISABLED.
- OPS$ logins are ENABLED.
- OPS$ROOT logins are DISABLED.
- Orasrv is detached from the terminal.
- Break mode = IN BAND.
- Debug level = 1
- No timeout (on orasrv handshaking).
- Length of listen queue = 10
- Orasrv logfile = /u2/7012f/tcp/log/orasrv.log
- Orasrv mapfile = /etc/oratab
-
- This tells you that the server is running, and has been running
- for a week. It has serviced 87 connections since it was started,
- and there are currently 9 connections made to the server.
- The active SIDs were read in from the /etc/oratab file.
-
- If the server is not running, it will look like:
-
- tcpctl status
- tcputl: server is not running: Connection refused
-
- ** 'tcpctl start' should start the TCP/IP listener process (orasrv).
-
- tcpctl start
- tcpctl: log file is /u2/7012f/tcp/log/orasrv.log
- tcpctl: SID mapping file is /etc/oratab
- tcpctl: server will be run under oracle
- tcpctl: logging mode is on
-
- orasrv: Release 1.2.7.5.1 - Production on Wed Sep 15 12:01:06 1993
-
- Copyright (c) Oracle Corporation 1979, 1993. All rights reserved.
-
- Starting server on port 1525.
- tcpctl: server has been started
-
- This means that server was succesfully started on port 1525 (which
- was read in from the /orasrv entry of the etc/services file).
-
- You may get the following error if you try to issue the 'tcpctl
- start' immediately after issuing a 'tcpctl stop':
-
- Starting server on port 1525.
- orasrv: server already running: Address already in use
-
- If this happens, wait a few minutes and try again, while the UNIX
- operating system releases the port.
-
- ** 'tcpctl stop' should stop the TCP/IP listener process (orasrv).
-
- 'tcpctl stop' requires that you log into the A/UX machine as the
- user who started the server. You must actually log into the
- machine or telnet to the machine to have the proper priviledges.
- If I log in as a user who is not a dba, and use the 'su - oracle'
- command to become the oracle user, it will not work:
-
- tcpctl stop
- tcputl: checking user permission...
- tcputl: permission denied
-
- If I then telnet to this machine as oracle, or log out and log in
- as oracle, it will work:
-
- tcpctl stop
- tcputl: checking user permission...
- tcputl: server has been stopped
-
- You can also stop the orasrv process by killing it.
-
- ps -ef | grep orasrv (this finds the orasrv process...)
- oracle 692 1 0 Sep 21 ? 0:02 orasrv
- vgrigori 16358 15344 2 18:17:44 p2 0:00 grep orasrv
-
- kill 692 (This kills the orasrv process.)
-
- orasrv orasrv is the SQL*Net TCP/IP version 1 listener process which is
- controlled by the tcpctl program.
-
- atksrv atksrv is the SQL*Net Appletalk version 1 listener process. It is
- invoked with the command atksrv.
-
- atksrv Squid
- atksrv: Release 1.0.1.2.1 - Production on Wed Sep 15 12:38:06 1993
-
- Copyright (c) Oracle Corporation 1979, 1993. All rights reserved.
-
- Server name is Squid
-
- Server Squid[10790] is accepting connections....
-
- * If you get the error: Cannot register service "Squid" on network,
- that means that there is an appletalk listener using that name
- already in your zone of the Appletalk network.
-
- The [10790] tells you the PID of the atksrv process. You can stop
- the atksrv listener by hitting control-C, or by killing the
- process manually from another UNIX prompt.
-
- You could also kill the atksrv process in the same way you could
- kill the orasrv process, which is described in the tcpctl section.
-
- sqldba sqldba is the utility used to administrate the Oracle database. It
- can create, startup, and shutdown databases. If the database is
- not running, you can only connect to it by using 'connect
- internal'. Once connected internally, you may startup and
- shutdown the database.
-
- sqldba
-
- SQL*DBA: Release 7.0.12.2.0 - Production on Wed Sep 15 12:44:56
-
- Copyright (c) Oracle Corporation 1979, 1993. All rights reserved.
-
- ORACLE7 Server Release 7.0.12.2.0 - Production
- With the procedural and distributed options
- PL/SQL Release 2.0.14.0.1
-
- SQLDBA> connect system/manager
- ORA-01034: ORACLE not available
- ORA-07318: smsget: open error when opening sgadef.dbf file.
- Macintosh A/UX Error: 2: No such file or directory
-
- The above error occurs when the database is not running. If you
- are logged in as a user in the dba group, you may connect
- internally and startup the database.
-
- SQLDBA> connect internal
- Connected.
- SQLDBA> startup
- ORACLE instance started.
- Database mounted.
- Database opened.
- Total System Global Area 7319428 bytes
- Fixed Size 30492 bytes
- Variable Size 6453352 bytes
- Database Buffers 819200 bytes
- Redo Buffers 16384 bytes
-
- After starting up the database, you may connect as a database
- user.
-
- SQLDBA> connect scott/tiger
- Connected.
-
- You could then connect internally and shutdown the database.
-
- SQLDBA> connect internal
- Connected.
- SQLDBA> shutdown
- Database closed.
- Database dismounted.
- ORACLE instance shut down.
-
- Loopback You could then attempt a TCP/IP connection to the database
- (provided you have started the orasrv process). This is called a
- loopback, as the server machine is making a connection to itself,
- which is a useful test of the server's functionality.
-
- SQLDBA> connect scott/tiger@t:squid:S7F
- Connected.
-
- * You may get errors trying to do the loopback.
-
- ORA-6114 - problem with the SID you specified. Compare the SID
- you tried with the /etc/oratab file.
-
- ORA-6401 - you did not install SQL*Net TCP/IP.
-
- ORA-3113 - you probably did not install the C programming option
- of A/UX and oracle was not properly installed.
-
- ORA-6107 - you need to add the orasrv entry to /etc/services.
-
- ORA-6105 - you need to add the server's hostname to /etc/hosts
-
- ORA-6108 - orasrv is not running, or you have the wrong IP
- address entered for your server in /etc/hosts.
- Refer to the description of ping above.
-
- ORA-1034 - orasrv is running properly, but the rdbms is not.
- Use sqldba to start the database.
-
- ORA-7318 - This error usually follows ORA-1034, but it means the
- same thing. The database is not running.
-
- /etc/oratab - This file lists the instances (SID's) available on the
- A/UX machine. The has one line per database on the
- machine. Lines beginning with '#' are comments which are
- ignored. Each line is made up of the format:
-
- SID:ORACLE_HOME:STARTUP
-
- Where: SID is the name of the database
- ORACLE_HOME is where you installed the database
- STARTUP is either Y or N, which indicates whether
- the dbstart and dbshut utilities should
- start or stop that database.
-
- The default /etc/oratab should have the line:
-
- SAMP:/users/oracle:N
-
- This means that I have one database on my machine, it is
- named SAMP, and the ORACLE_HOME for the SAMP database is
- /users/oracle. The ORA-6114 error occurs if you attempt
- to connect to a database that is not listed in the
- oratab file.
-
- *** The capitalization of the SID is important
- *** 'SAMP' is different from 'samp'.
-
-